<?php
class Application_Form_Login extends Zend_Form{
	public function init(){
		$this->setName('login');
		$this->setMethod('post');
		
		$login = new Zend_Form_Element_Text('login');
		$login	->setLabel('Login')
				->setRequired(true)
				->addFilter('StripTags')
				->addFilter('StringTrim')
				->addValidator('NotEmpty')
				->addValidator(new Zend_Validate_StringLength(4));
		$this->addElement($login);
		
		$pass = new Zend_Form_Element_Password('password');
		$pass	->setLabel('Password')
				->setRequired(true)
				->addFilter('StripTags')
				->addFilter('StringTrim')
				->addValidator('NotEmpty')
				->addValidator(new Zend_Validate_StringLength(4));
		$this->addElement($pass);
		
		$recaptcha = new Zend_Service_ReCaptcha('6LfVQMsSAAAAAKRkO3IsPAh4moQdp5mZ3fEn1EVq', '6LfVQMsSAAAAAMBnxJ7zhvi5lcVqYnAYmzgeVT_j');
		$recaptcha->setOption('theme', 'blackglass');
		$captcha = new Zend_Form_Element_Captcha('captcha',
              array('captcha'        => 'ReCaptcha',
                    'captchaOptions' => array('captcha' => 'ReCaptcha',
                                             'service' => $recaptcha)));

        $this->addElement($captcha);
		
		$submit = new Zend_Form_Element_Submit('submit');
		$submit	->setLabel('Connect');
		$this->addElement($submit);
		
	}
}